import { Position, type NodeProps } from "reactflow";
import CustomHandle from "./CustomHandle";

// 输入节点组件作为工作流的起点
const InputNode = ({ selected }: NodeProps) => {
  return (
    <div
      className={`px-4 py-2 max-w-sm shadow-md rounded-md bg-gray-200 border-5 ${selected ? " border-red-600" : "border-transparent"} `}
    >
      <div className="flex items-center">
        <div className="rounded-full w-12 h-12 flex items-center justify-center bg-gray-100 shrink-0">
          📝
        </div>
        <div className="ml-2">
          <div className="text-gray-500 text-lg font-bold">START</div>
          <div className="text-gray-500">起始节点</div>
        </div>
      </div>

      {/* 输出连接点 */}
      <CustomHandle type="source" position={Position.Right} />
    </div>
  );
};

export default InputNode;
